1d3c3ef6b552bdf2422c8e56f1e486e7463dc1ff,plugins/IntentionPowerPak/src/com/siyeh/ipp/junit/FlipAssertLiteralIntention.java,FlipAssertLiteralIntention,processIntention,#PsiElement#,58

Before Change


        PsiTreeUtil.getParentOfType(call, PsiMethod.class);
      if (containingMethod != null &&
          AnnotationUtil.isAnnotated(containingMethod, "org.junit.Test", true)) {
        if (ImportUtils.nameCanBeStaticallyImported(
          "org.junit.Assert", toMethodName, element)) {
          ImportUtils.addStaticImport("org.junit.Assert", toMethodName, element);
        }
        else {
          newCall.append("org.junit.Assert.");

After Change


    if (qualifier == null) {
      final PsiMethod containingMethod = PsiTreeUtil.getParentOfType(call, PsiMethod.class);
      if (containingMethod != null && AnnotationUtil.isAnnotated(containingMethod, "org.junit.Test", true)) {
        if (!ImportUtils.addStaticImport("org.junit.Assert", toMethodName, element)) {
          newCall.append("org.junit.Assert.");
        }
      }